/*
Copyright (C) Ariff Ehsan, Abdul Hadi Fikri

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*  Author : Ariff Ehsan
 *           Abdul Hadi Fikri
 *  Date   : June 18, 2009
 *
 *  Some contents of this file is borrowed from TinyOS error file (tinyerror.h).
 *  However, it is then modified by the author for the purpose of using it
 *  in Anos system.
 */


#ifndef __ANOS_ERROR_H__
#define __ANOS_ERROR_H__

enum AnosErrorEnums {
  SUCCESS        = 0,          
  FAIL           = 1,           // Generic condition: backwards compatible
  ESIZE          = 2,           // Parameter passed in was too big.
  ECANCEL        = 3,           // Operation cancelled by a call.
  EOFF           = 4,           // Subsystem is not active
  EBUSY          = 5,           // The underlying system is busy; retry later
  EINVAL         = 6,           // An invalid parameter was passed
  ERETRY         = 7,           // A rare and transient failure: can retry
  ERESERVE       = 8,           // Reservation required before usage
  EALREADY       = 9,           // The device state you are requesting is already set
};

typedef uint8_t error_t;


#endif // __ANOS_ERROR_H__
